﻿using Guest_room.BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace Guest_room
{
    public partial class CHpwd : Form
    {
       
        public CHpwd()
        {
            InitializeComponent();
        }

        private void CHpwd_Load(object sender, EventArgs e)
        {
            textBox1.Text = Home.userid ?? Login.userid;
        }


        GuestRoomService guestRoomService = new GuestRoomService();
        private void button1_Click(object sender, EventArgs e)
        {
            string message = guestRoomService.ChangeEmployeePassword(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);
            MessageBox.Show(message);

            if (message == "密码修改成功！")
            {
                this.Close();
            }
        }




        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
